package net.uhuijia.user.usermall.service;

import net.uhuijia.enums.UserIdentity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.uhuijia.appbase.service.BaseService;
import net.uhuijia.user.usermall.persistence.model.UserMall;
import net.uhuijia.user.usermall.persistence.model.UserMallExample;
import net.uhuijia.vo.user.usermall.param.LoginParamVo;


@Service
@Transactional
public interface UserMallService
     extends BaseService<UserMall,UserMallExample> {

	/**
	 * 用户注册
	 * @param param
	 * @return
	 * @author 许小宝
	 */
	UserMall reg(LoginParamVo param);

	/**
	 * 根据用户手机号码获得用户信息
	 * @param phone
	 * @return
	 * @author 许小宝
	 */
	UserMall getByPhone(String phone);

	/**
	 * 根据用户手机号码与密码查找用户
	 * @param phone
	 * @param pwd
	 * @return
	 * @author 许小宝
	 */
	UserMall getByPhonePwd(String phone, String pwd);

	/**
	 * 根据用户邮箱与密码查找用户信息
	 * @param email
	 * @param pwd
	 * @return
	 * @author 许小宝
	 */
	UserMall getByEmailPwd(String email, String pwd);

	/**
	 * 根据用户编号与密码查找用户信息
	 * @param number
	 * @param pwd
	 * @return
	 * @author 许小宝
	 */
	UserMall getByNumberPwd(String number, String pwd);

	/**
	 * 检测用户身份信息
	 * @param userMall 用户
	 * @param identity 需要效验的身份
	 * @return
	 */
	boolean checkUserMallIIdentity(UserMall userMall,UserIdentity identity);


}